/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.io.IOException;
/*     */ import java.util.List;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.gui.Gui;
/*     */ import net.minecraft.client.gui.GuiButton;
/*     */ import net.minecraft.client.gui.ScaledResolution;
/*     */ import net.minecraft.client.renderer.BufferBuilder;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.Tessellator;
/*     */ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
/*     */ import net.minecraftforge.fml.client.config.GuiUtils;
/*     */ import org.lwjgl.input.Mouse;
/*     */ import org.lwjgl.opengl.GL11;
/*     */ 
/*     */ public abstract class bx
/*     */ {
/*     */   private final Minecraft p;
/*     */   public final int n;
/*     */   public final int b;
/*     */   public final int v;
/*     */   public final int k;
/*     */   public final int o;
/*     */   public final int y;
/*     */   public final int h;
/*     */   public final int u;
/*     */   public final int j;
/*     */   private int c;
/*     */   private int r;
/*     */   public int f;
/*     */   public int s;
/*  33 */   private float m = -2.0F;
/*     */   private float l;
/*     */   private float t;
/*  36 */   public int d = -1;
/*  37 */   private long z = 0L;
/*     */   
/*     */   private boolean i = true;
/*     */   private boolean w;
/*     */   private int q;
/*     */   public boolean g = true;
/*     */   
/*     */   public bx(int i, int j, int k, int m, int n, int i1, int i2) {
/*  45 */     this(Minecraft.func_71410_x(), k, m, j, j + m, i, n, i1, i2);
/*     */   }
/*     */   
/*     */   public bx(Minecraft minecraft, int i, int j, int k, int m, int n, int i1, int i2, int i3) {
/*  49 */     this.p = minecraft;
/*  50 */     this.n = i;
/*  51 */     this.b = j;
/*  52 */     this.o = k;
/*  53 */     this.y = m;
/*  54 */     this.j = i1;
/*  55 */     this.u = n;
/*  56 */     this.h = i + this.u;
/*  57 */     this.v = i2;
/*  58 */     this.k = i3;
/*     */   }
/*     */   
/*     */   @Deprecated
/*     */   public void v(boolean bool) {
/*  63 */     this.i = bool;
/*     */   }
/*     */   
/*     */   @Deprecated
/*     */   public void z(boolean bool, int i) {
/*  68 */     v(bool, i);
/*     */   }
/*     */   
/*     */   public void v(boolean bool, int i) {
/*  72 */     this.w = bool;
/*  73 */     this.q = i;
/*  74 */     if (!bool) this.q = 0; 
/*     */   }
/*     */   
/*     */   public boolean v(int i, int j) {
/*  78 */     return (i >= this.u && i <= this.h && j >= this.o && j <= this.y);
/*     */   }
/*     */   
/*     */   public abstract int z();
/*     */   
/*     */   public abstract void v(int paramInt, boolean paramBoolean);
/*     */   
/*     */   public abstract boolean v(int paramInt);
/*     */   
/*     */   public int v() {
/*  88 */     return z() * this.j + this.q;
/*     */   }
/*     */   
/*     */   public void z() {
/*  92 */     Gui.func_73734_a(this.u - 1, this.o - 1, this.h + 1, this.y + 1, -13158601);
/*  93 */     Gui.func_73734_a(this.u, this.o, this.h, this.y, -16777216);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public abstract void v(int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean, Tessellator paramTessellator);
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @Deprecated
/*     */   public void z(int i, int j, Tessellator tessellator) {}
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void v(int i, int j, Tessellator tessellator) {
/* 112 */     z(i, j, tessellator);
/*     */   }
/*     */ 
/*     */   
/*     */   @Deprecated
/*     */   public void y(int i, int j) {}
/*     */   
/*     */   public void t(int i, int j) {
/* 120 */     y(i, j);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @Deprecated
/*     */   public void h(int i, int j) {}
/*     */ 
/*     */ 
/*     */   
/*     */   public void z(int i, int j) {
/* 132 */     h(i, j);
/*     */   }
/*     */   
/*     */   @Deprecated
/*     */   public int v(int i, int j) {
/* 137 */     int k = this.u + 1;
/* 138 */     int m = this.u + this.n - 7;
/* 139 */     int n = j - this.o - this.q + (int)this.t - 4;
/* 140 */     int i1 = n / this.j;
/* 141 */     return (i >= k && i <= m && i1 >= 0 && n >= 0 && i1 < z()) ? i1 : -1;
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(List list, int i, int j) {
/* 146 */     this.c = i;
/* 147 */     this.r = j;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void v(GuiButton guiButton) {
/* 166 */     if (guiButton.field_146124_l) {
/* 167 */       if (guiButton.field_146127_k == this.c) {
/* 168 */         this.t -= (this.j * 2 / 3);
/* 169 */         this.m = -2.0F;
/* 170 */         v();
/* 171 */       } else if (guiButton.field_146127_k == this.r) {
/* 172 */         this.t += (this.j * 2 / 3);
/* 173 */         this.m = -2.0F;
/* 174 */         v();
/*     */       } 
/*     */     }
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(int i, int j) throws IOException {
/* 181 */     boolean bool = (i >= this.u && i <= this.u + this.n && j >= this.o && j <= this.y);
/*     */     
/* 183 */     if (!bool) {
/*     */       return;
/*     */     }
/* 186 */     int k = Mouse.getEventDWheel();
/* 187 */     if (k != 0) {
/* 188 */       this.t += (-1 * k) / 120.0F * this.j / 2.0F;
/*     */     }
/*     */   }
/*     */   
/*     */   public void v(int i, int j, float f) {
/* 193 */     this.f = i;
/* 194 */     this.s = j;
/* 195 */     z();
/*     */     
/* 197 */     boolean bool = (i >= this.u && i <= this.u + this.n && j >= this.o && j <= this.y);
/*     */     
/* 199 */     int k = z();
/* 200 */     int m = 10;
/* 201 */     int n = this.u + this.n;
/* 202 */     int i1 = n - m;
/* 203 */     int i2 = this.u;
/* 204 */     int i3 = i1 - 1;
/* 205 */     int i4 = this.y - this.o;
/* 206 */     int i5 = 4;
/*     */     
/* 208 */     if (Mouse.isButtonDown(0)) {
/* 209 */       if (this.m == -1.0F) {
/* 210 */         if (bool) {
/* 211 */           int i8 = j - this.o - this.q + (int)this.t - i5;
/* 212 */           int i9 = i8 / this.j;
/*     */           
/* 214 */           if (i >= i2 && i <= i3 && i9 >= 0 && i8 >= 0 && i9 < k) {
/* 215 */             v(i9, (i9 == this.d && System.currentTimeMillis() - this.z < 250L));
/* 216 */             this.d = i9;
/* 217 */             this.z = System.currentTimeMillis();
/* 218 */           } else if (i >= i2 && i <= i3 && i8 < 0) {
/* 219 */             t(i - i2, j - this.o + (int)this.t - i5);
/*     */           } 
/*     */           
/* 222 */           if (i >= i1 && i <= n) {
/* 223 */             this.l = -1.0F;
/* 224 */             int i10 = v() - i4 - i5;
/* 225 */             if (i10 < 1) i10 = 1;
/*     */             
/* 227 */             int i11 = (int)((i4 * i4) / v());
/*     */             
/* 229 */             if (i11 < 32) i11 = 32; 
/* 230 */             if (i11 > i4 - i5 * 2) {
/* 231 */               i11 = i4 - i5 * 2;
/*     */             }
/* 233 */             this.l /= (i4 - i11) / i10;
/*     */           } else {
/* 235 */             this.l = 1.0F;
/*     */           } 
/*     */           
/* 238 */           this.m = j;
/*     */         } else {
/* 240 */           this.m = -2.0F;
/*     */         } 
/* 242 */       } else if (this.m >= 0.0F) {
/* 243 */         this.t -= (j - this.m) * this.l;
/* 244 */         this.m = j;
/*     */       } 
/*     */     } else {
/* 247 */       this.m = -1.0F;
/*     */     } 
/*     */     
/* 250 */     v();
/*     */ 
/*     */     
/* 253 */     Tessellator tessellator = Tessellator.func_178181_a();
/* 254 */     BufferBuilder bufferBuilder = tessellator.func_178180_c();
/*     */     
/* 256 */     ScaledResolution scaledResolution = new ScaledResolution(this.p);
/* 257 */     double d1 = this.p.field_71443_c / scaledResolution.func_78327_c();
/* 258 */     double d2 = this.p.field_71440_d / scaledResolution.func_78324_d();
/* 259 */     GL11.glEnable(3089);
/* 260 */     GL11.glScissor((int)(this.u * d1), (int)(this.p.field_71440_d - this.y * d2), (int)(this.n * d1), (int)(i4 * d2));
/*     */ 
/*     */     
/* 263 */     if (this.p.field_71441_e == null) {
/*     */ 
/*     */ 
/*     */       
/* 267 */       GlStateManager.func_179140_f();
/* 268 */       GlStateManager.func_179106_n();
/* 269 */       this.p.field_71446_o.func_110577_a(Gui.field_110325_k);
/* 270 */       GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/* 271 */       float f1 = 32.0F;
/* 272 */       bufferBuilder.func_181668_a(7, DefaultVertexFormats.field_181709_i);
/* 273 */       bufferBuilder.func_181662_b(this.u, this.y, 0.0D).func_187315_a((this.u / 32.0F), ((this.y + (int)this.t) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
/* 274 */       bufferBuilder.func_181662_b(this.h, this.y, 0.0D).func_187315_a((this.h / 32.0F), ((this.y + (int)this.t) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
/* 275 */       bufferBuilder.func_181662_b(this.h, this.o, 0.0D).func_187315_a((this.h / 32.0F), ((this.o + (int)this.t) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
/* 276 */       bufferBuilder.func_181662_b(this.u, this.o, 0.0D).func_187315_a((this.u / 32.0F), ((this.o + (int)this.t) / 32.0F)).func_181669_b(32, 32, 32, 255).func_181675_d();
/* 277 */       tessellator.func_78381_a();
/*     */     } 
/*     */     
/* 280 */     int i6 = this.o + i5 - (int)this.t;
/*     */     
/* 282 */     if (this.w) {
/* 283 */       v(i3, i6, tessellator);
/*     */     }
/*     */     int i7;
/* 286 */     for (i7 = 0; i7 < k; i7++) {
/* 287 */       int i8 = i6 + i7 * this.j + this.q;
/* 288 */       int i9 = this.j - i5;
/*     */       
/* 290 */       if (i8 <= this.y && i8 + i9 >= this.o) {
/* 291 */         boolean bool1 = (i >= this.u + 1 && i <= this.u + this.n - 12 && j >= i8 - 1 && j <= i8 + this.j - 3);
/*     */ 
/*     */         
/* 294 */         v(i7, i3, i8, i9, bool1, tessellator);
/*     */       } 
/*     */     } 
/*     */     
/* 298 */     GlStateManager.func_179097_i();
/*     */     
/* 300 */     i7 = v() + i5 - i4;
/* 301 */     if (i7 > 0) {
/* 302 */       int i8 = i4 * i4 / v();
/*     */       
/* 304 */       if (i8 < 32) i8 = 32;
/*     */       
/* 306 */       if (i8 > i4 - i5 * 2) {
/* 307 */         i8 = i4 - i5 * 2;
/*     */       }
/* 309 */       int i9 = (int)this.t * (i4 - i8) / i7 + this.o;
/* 310 */       if (i9 < this.o) {
/* 311 */         i9 = this.o;
/*     */       }
/*     */       
/* 314 */       v(i1, i9, i8);
/*     */     } 
/*     */     
/* 317 */     z(i, j);
/* 318 */     GlStateManager.func_179098_w();
/* 319 */     GlStateManager.func_179103_j(7424);
/* 320 */     GlStateManager.func_179141_d();
/* 321 */     GlStateManager.func_179084_k();
/* 322 */     GL11.glDisable(3089);
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(int i, int j, int k) {
/* 327 */     Gui.func_73734_a(i, this.o, i + 10, this.y, -1);
/* 328 */     Gui.func_73734_a(i + 1, this.o + 1, i + 9, this.y - 1, -13158601);
/* 329 */     Gui.func_73734_a(i + 2, this.o + 2, i + 9, this.y - 2, -7631989);
/*     */ 
/*     */ 
/*     */     
/* 333 */     Gui.func_73734_a(i + 1, j, i + 10, j + k, -1);
/*     */     
/* 335 */     Gui.func_73734_a(i + 2, j + 1, i + 10, j + k, -13158601);
/*     */     
/* 337 */     Gui.func_73734_a(i + 2, j + 1, i + 9, j + k - 1, -7631989);
/*     */     
/* 339 */     Gui.func_73734_a(i + 10, j, i + 10, j + 1, -7631989);
/* 340 */     Gui.func_73734_a(i + 1, j + k - 1, i + 1, j + k, -7631989);
/*     */   }
/*     */   
/*     */   public void v(int i, int j, int k, int m, int n, int i1) {
/* 344 */     GuiUtils.drawGradientRect(0, i, j, k, m, n, i1);
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\bx.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */